﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Dazaza.Framework.Data;
using Dazaza.Framework.Entity;
using System.Data;

namespace Dazaza.Domain.Model
{
    /// <summary>
    /// [info]
    /// </summary>
    public class InfoModel
    {
        [DataMapping("url",System.Data.DbType.String)]
        public string Url { get; set; }
        [DataMapping("title", System.Data.DbType.String)]
        public string Title { get; set; }
        [DataMapping("tags", System.Data.DbType.String)]
        public string Tags { get; set; }
        [DataMapping("name", System.Data.DbType.String)]
        public string Name { get; set; }
        [DataMapping("posttime", System.Data.DbType.DateTime)]
        public DateTime Posttime { get; set; }
        [DataMapping("ip", System.Data.DbType.String)]
        public string Ip { get; set; }
        [DataMapping("mark", System.Data.DbType.Int32)]
        public int Mark { get; set; }
        [DataMapping("click", System.Data.DbType.Int32)]
        public int Click { get; set; }
        /// <summary>
        /// 已无意义
        /// </summary>
        [DataMapping("commentcount", System.Data.DbType.Int32)]
        public int CommentCount { get; set; }
        [DataMapping("note", System.Data.DbType.String)]
        public string Note { get; set; }
        [DataMapping("imagename", System.Data.DbType.String)]
        public string ImageName { get; set; }
        [DataMapping("infoid", System.Data.DbType.Int32)]
        public int InfoID { get; set; }
        [DataMapping("abstract", System.Data.DbType.String)]
        public string Abstract { get; set; }
        [DataMapping("isarticle", System.Data.DbType.Int32)]
        public int IsArticle { get; set; }
        [DataMapping("category", System.Data.DbType.String)]
        public string Category { get; set; }
        [DataMapping("bury", System.Data.DbType.Int32)]
        public int Bury { get; set; }
        [DataMapping("isanchordig", System.Data.DbType.Int32)]
        public int IsAnchorDig { get; set; }
        [DataMapping("isanchorbury", System.Data.DbType.Int32)]
        public int IsAnchorBury { get; set; }
        [DataMapping("favoritecount", System.Data.DbType.Int32)]
        public int FavoriteCount { get; set; }
        [DataMapping("clickip", System.Data.DbType.Int32)]
        public int ClickIP { get; set; }
        [DataMapping("commentip", System.Data.DbType.Int32)]
        public int CommentIP { get; set; }
        [DataMapping("favoriteip", System.Data.DbType.Int32)]
        public int FavoriteIP { get; set; }
        [DataMapping("weight", System.Data.DbType.Int32)]
        public int Weight { get; set; }
        [DataMapping("ischecked", System.Data.DbType.Int32)]
        public int IsChecked { get; set; }
        [DataMapping("ishighlights", System.Data.DbType.Int32)]
        public int IsHighlights { get; set; }
        [DataMapping("isdelete", System.Data.DbType.Int32)]
        public int IsDelete { get; set; }
        [DataMapping("rank", System.Data.DbType.Int32)]
        public int Rank { get; set; }

        /// <summary>
        /// 一级分类
        /// </summary>
        [DataMapping("categoryclass", System.Data.DbType.String)]
        public string CategoryClass { get; set; }

        // join dbo.[users]
        [DataMapping("userid", System.Data.DbType.Int32)]
        public int UserID { get; set; }
        [DataMapping("nickname", System.Data.DbType.String)]
        public string NickName { get; set; }

        // 子查询 dbo.[comment]，从comment表中得到的评论数量
        [DataMapping("commentcount_", System.Data.DbType.Int32)]
        public int CommentCount_ { get; set; }
    }
}
